<template>
    <el-menu-item :index="index(menu)" :route="{path: menu.url}"
                  >
        <i :class="menu.icon"></i>
        {{menu.name}}</el-menu-item>
</template>

<script>
    export default {
        name: "StElMenuItem",
        props: {
            menu: {
                type: Object,
                required: true
            },
            index: {
                type: Function,
                default: function (menu) {
                    return menu.id
                }
            },
        }
    }
</script>

<style scoped>
</style>